#include "changes.h"

namespace Api
{

void addToChanges(
    Changes& changes,
    Elements::ElementType type,
    unsigned id
)
{
    if (0 == changes.count(type))
        changes[type] = {id};
    else
        changes[type].insert(id);
}

void addToChanges(
    Changes& changes,
    Elements::ElementType type,
    const std::vector<unsigned>& ids
)
{
    changes[type].insert(ids.begin(), ids.end());
}

} // namespace Api
